﻿using ET.Monitor.DAL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET.Monitor.Model
{
    public class CountryModel
    {
        string id = "", year = "", holidayList = "";
        DateTime sTime = new DateTime();
        DateTime eTime = new DateTime();
        public CountryModel(string id, DateTime st, DateTime et)
        {
            this.id = id;
            this.sTime = st;
            this.eTime = et;
        }

        public CountryModel(string year, string nationHolidayList)
        {
            this.year = year;
            this.holidayList = nationHolidayList;
        }
        public CountryModel()
        {

        }
        CountryDAL dal = new CountryDAL();

        #region
        DataTable dtCountry;

        public DataTable DtCountry
        {
            get { return dal.GetCountry(); }
            set { dtCountry = value; }
        }
        #endregion

        #region
        DataTable dtHoliday;

        public DataTable DtHoliday
        {
            get { return dal.GetHoliday("", sTime, eTime); }
            set { dtHoliday = value; }
        }
        bool addHolidayList;

        public bool AddHolidayList
        {
            get { return dal.AddHolidays(year, holidayList); }
            set { addHolidayList = value; }
        }
        #endregion

    }
}
